home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
turbotut.arc
/
STRARRAY.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1989-06-30
|
751b
|
28 lines
PROGRAM pure_pascal_strings;
TYPE long_string = ARRAY[1..25] OF CHAR;
string10 = ARRAY[1..10] OF CHAR;
string12 = ARRAY[1..12] OF CHAR;
VAR first_name : string10;
initial : CHAR;
last_name : string12;
full_name : long_string;
index : INTEGER;
BEGIN (* main program *)
first_name := 'John ';
initial := 'Q';
last_name := 'Doe ';
WRITELN(first_name,initial,last_name);
FOR index := 1 TO 10 DO
full_name[index] := first_name[index];
full_name[11] := initial;
FOR index := 1 TO 12 DO
full_name[index + 11] := last_name[index];
FOR index := 24 TO 25 DO full_name[index] := ' ';
WRITELN(full_name);
END. (* main program *)